home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / grafik / cgazv5n3 / lex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-27  |  1.3 KB  |  24 lines

  1. /* Listing 1. LEX.H -- Lexeme Definitions */
  2.  
  3.  typedef enum token      /* Token definitions.                        */
  4.  {
  5.      NO_TOKEN = -1, /*  Number not used as a token value.             */
  6.      EOI      = 0,  /*  Reserve zero for end of input.                */
  7.      EQUAL,         /*  =                                             */
  8.      ID,            /*  string of alphanumerics, starting with alpha. */
  9.      LP,            /*  (                                             */
  10.      MINUS,         /*  -                                             */
  11.      NUMBER,        /*  string of numeric characters                  */
  12.      PLUS,          /*  +                                             */
  13.      RP,            /*  )                                             */
  14.      SEMI,          /*  ;                                             */
  15.      SLASH,         /*  /                                             */
  16.      STAR,          /*  *                                             */
  17.      WHILE          /*  while                                         */
  18.  }
  19.  token ;
  20.  
  21.  extern int match( token t );    /* scanner functions in lex.c */
  22.  extern void advance( void );
  23.  extern char *yytext;            /* current lexeme (unterminated) */
  24.  extern int  yyleng;             /* number of chars in lexeme     */